import router from './router'

function routeTxPage (txId) {
  router.push({ name: 'tx', params: { tx_id: txId } })
}
function routeAddrPage (addr) {
  router.push({ name: 'addr', params: { addr: addr } })
}
export default {
  searchAndGo (inputText) {
    if (inputText.length > 13) {
      routeTxPage(inputText)
    } else {
      routeAddrPage(inputText)
    }
  }
}
